<template>
  <ant-modal modalWidth="1000" modalHeight="600" :visible="open" :modal-title="formTitle" :adjust-size="true" :maskClosable="false"
    @cancel="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row>
        <a-col :span="12">
          <a-form-item label="工序计划">
            <a-select placeholder="请选择工序计划" v-model="form.processPlanId" style="width: 100%" allow-clear>
              <a-select-option v-for="(d, index) in form.planOptions" :key="index" :value="d.processPlanId">{{ d.processNumber }}</a-select-option>
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :span="24">
          <a-card :bordered="false">
            <advance-table :loading="loading" rowKey="id" size="middle" :columns="columns1" :data-source="form.processList"
              :pagination="false" :bordered="true">
              <span slot="nameSlot" slot-scope="{record}">
                <a-select placeholder="请选择工序" v-model="record.productionProcessId" style="width: 100%" allow-clear>
                  <a-select-option v-for="(d, index) in processOptions" :key="index" :value="d.id">{{ d.processName }}</a-select-option>
                </a-select>
              </span>
              <span slot="processSlot" slot-scope="{record}">
                <a-input type='text' placeholder="请输入" v-model="record.unitProcessVol"/>
              </span>
              <span slot="salarySlot" slot-scope="{record}">
                <a-input type='text' placeholder="请输入" v-model="record.unitSalary"/>
              </span>
              <span slot="remarkSlot" slot-scope="{record}">
                <a-input type='text' placeholder="请输入" v-model="record.remark"/>
              </span>
            </advance-table>
              
          </a-card>
        </a-col>
      </a-row>

    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="savePlan(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import BizOrderPlan from './BizOrderPlan'
export default {
  ...BizOrderPlan
}
</script>
<style lang="less" scoped>
.table-operations,
body tr.ant-table-expanded-row:hover .table-operations {
  padding-bottom: 8px;
  text-align: right;
}

.table-operations {
  margin-bottom: 16px;
}

.table-operations>button,
.table-operations .ant-input-affix-wrapper {
  margin-right: 8px;
}

.table_title {
  float: left;
  padding-left: 8px;
  font-weight: 600;
  color: #222222;
  line-height: 30px;
}
</style>
